import React from 'react';
import {Header} from './components';
import {Provider} from "react-redux";
import {BrowserRouter, Route, Switch} from "react-router-dom";

import "./reset.css";
import store from "./redux/store";
import {Detail, Home} from './pages';

const App: React.FC = () => {
  return (
    <Provider store={store}>
      <div className="App">
        <Header/>
        <BrowserRouter>
          <Switch>
            <Route path="/" exact component={Home}/>
            <Route path="/detail/:id" component={Detail}/>
          </Switch>
        </BrowserRouter>
      </div>
    </Provider>
  );
}

export default App;
